#include "stm32f10x.h"                  // Device header
#include "OLED.h"
#include "LED.h"
#include "Servo.h"
#include "Delay.h"


uint16_t i;

int main(void)
{
	Servo_Init();
	OLED_Init();
	OLED_ShowString(1,1,"Start Init!");
	Servo_SetAngle(0);
	Delay_ms(2000);					//让舵机回转到0度
	while(1)
	{
		for (i=0; i<=180; i+=30)
		{
			OLED_ShowString(2,1,"Servo_Angle:");
			OLED_ShowNum(2,13,i,3);
			Servo_SetAngle(i);
			Delay_ms(1000);
		}
		OLED_ShowString(1,1,"It`s Over!      ");
		Delay_ms(2000);
		break;
	}
	OLED_Clear();
	OLED_ShowString(2,1,"Hello! ZYF");
}
